<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:c="http://xmlns.jcp.org/jsf/composite"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<title>VEND MACHINE</title>
	<link type="text/css" rel="stylesheet"
		href="#{request.contextPath}/css/skytef.css" />
</h:head>

<h:body>
	<ui:include src="/jsp/WEB/header.xhtml" />

	<div class="central">
		<h:form id="form" style="padding-top: 80px">

			<p:panel id="RelPed" header="Relatório de Pedidos"
				style="margin-left:30px;margin-right:30px">
				<p:panelGrid id="gridRel" columns="5" style="border:0px">
					<p:selectOneMenu style="font-size: 14px;"
						value="#{RelatorioBean.tpConsulta}">
						<f:selectItem itemLabel="Todos" noSelectionOption="false"
							itemValue="1" />
						<f:selectItem itemLabel="Nº Pedido" itemValue="2" />
					</p:selectOneMenu>

					<p:inputText id="pedido" value="#{RelatorioBean.numPedido}" />
					<p:commandButton id="searchButton" image="ui-icon-search"
						update="@form" ajax="false" title="Localizar Pedidos"
						actionListener="#{RelatorioBean.exibirRelatorio}" />
				</p:panelGrid>

				<p:dataTable id="tabelaUsu" value="#{RelatorioBean.rel}" var="rel"
					rowIndexVar="rowIndex" emptyMessage="Nenhum registro encontrado"
					style="margin-top:80px; position: auto" paginator="true" rows="50">
					<p:column style=" font-size: 10px; width: 97px;" sortBy="descMerc">
						<f:facet name="header">Nº Pedido</f:facet>
						<h:outputText value="#{rel.idPedido}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px;" sortBy="descMerc">
						<f:facet name="header">Usuário</f:facet>
						<h:outputText value="#{rel.nomeUsu}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px;" sortBy="descMerc">
						<f:facet name="header">Descrição</f:facet>
						<h:outputText value="#{rel.descMerc}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px;" sortBy="qtde">
						<f:facet name="header">Quantidade</f:facet>
						<h:outputText value="#{rel.qtde}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px" sortBy="data">
						<f:facet name="header">Data</f:facet>
						<h:outputText value="#{rel.data}" />
					</p:column>

					<p:column style=" font-size: 10px; width: 97px" sortBy="hora">
						<f:facet name="header">Hora</f:facet>
						<h:outputText value="#{rel.hora}" />

					</p:column>
				</p:dataTable>
			</p:panel>

		</h:form>
		<p:panel id="cr"
			style="background: transparent; border: 0px;margin-top:10%">
			<ui:include src="#{DashboardBean.currentRodape}" />
		</p:panel>
	</div>

	<p:panel id="cm" style="background: transparent; border: 0px;margin-top:-7.0%">
		<ui:include src="#{DashboardBean.currentMenu}" />
	</p:panel>
</h:body>
</html>